DisplayCutoutCompat

Represents the area of the display that is not functional for displaying content.

DisplayCutoutCompat instances are immutable.

Constructors

Link copied to clipboard
constructor(@Nullable safeInsets: @Nullable Rect, @Nullable boundingRects: @Nullable List<Rect>)
Creates a DisplayCutout instance.
constructor(@NonNull safeInsets: @NonNull Insets, @Nullable boundLeft: @Nullable Rect, @Nullable boundTop: @Nullable Rect, @Nullable boundRight: @Nullable Rect, @Nullable boundBottom: @Nullable Rect, @NonNull waterfallInsets: @NonNull Insets)
Creates a DisplayCutout instance.
constructor(@NonNull safeInsets: @NonNull Insets, @Nullable boundLeft: @Nullable Rect, @Nullable boundTop: @Nullable Rect, @Nullable boundRight: @Nullable Rect, @Nullable boundBottom: @Nullable Rect, @NonNull waterfallInsets: @NonNull Insets, @Nullable cutoutPath: @Nullable Path)
Creates a DisplayCutout instance.

Functions

Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
@NonNull
open fun getBoundingRects(): @NonNull List<Rect>
Returns a list of Rects, each of which is the bounding rectangle for a non-functional area on the display.
Link copied to clipboard
@Nullable
open fun getCutoutPath(): @Nullable Path
Returns a Path that contains the cutout paths of all sides on the display.
Link copied to clipboard
Returns the inset from the bottom which avoids the display cutout in pixels.
Link copied to clipboard
open fun getSafeInsetLeft(): Int
Returns the inset from the left which avoids the display cutout in pixels.
Link copied to clipboard
Returns the inset from the right which avoids the display cutout in pixels.
Link copied to clipboard
open fun getSafeInsetTop(): Int
Returns the inset from the top which avoids the display cutout in pixels.
Link copied to clipboard
@NonNull
open fun getWaterfallInsets(): @NonNull Insets
Returns the insets representing the curved areas of a waterfall display.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
@NonNull
open fun toString(): @NonNull String